﻿@model FCNS.ERP.Models.ErpPxOrder

@{
    ViewBag.Title = "学员报名-新增";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>@ViewBag.Title</h2>
<link href="~/Content/Combo/combo.select.css" rel="stylesheet" />
<script src="~/Scripts/Combo/jquery.combo.select.js"></script>
<script>
    $(document).ready(function () {
        $("#KQId").val(@Html.Raw(ViewData["KqId"]));
        $("#CorSId").comboSelect(); 

        $("#PxPlanId").change(function () {
            $.get("/Px/PxPlanPriceGet", {
                id: $("#PxPlanId").val() 
            },
                function (data, status) {
                    if (status == "success") {
                        $("#Money").val(data);
                    } 
                });
        });

        $("#PxPlanId").change();
    });
</script>
@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" }) 
        <div class="form-group">
            @Html.LabelFor(model => model.PxPlanId,  htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("PxPlanId", ViewData["PxPlan"] as SelectList, htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.PxPlanId, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.CorSId,   htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("CorSId", ViewData["CorS"] as SelectList, htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.CorSId, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.KQId, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.KQId, new { htmlAttributes = new { @class = "form-control",@Min="1" } })
                @Html.ValidationMessageFor(model => model.KQId, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Money, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Money, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Money, "", new { @class = "text-danger" })
            </div>
        </div>
           
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="新增" class="btn btn-default" />
            </div>
        </div>
    </div>
}

    <div>
        <a class="backToListImg" href="/Px/PxOrder">返回</a>
    </div>
